Introduced:The previous JDI debugger how to establish a connection, send and process requests, here we focus on the human-Computer Interaction section, debugger UI, it is mainly responsible for how to make the operation of the person to request, and the request operation reflected in the debugger interface.Analysis:This plug-in is primarily defined in the Plugin.xml in Org.eclipse.jdt.debug.ui_As seen from here, it supports several operations: such as
The VA virtual machine provides a set of interfaces for debugging (jvmdi) and monitoring (jvmpi). After Java 5, it is unified as jvmti:
Http://docs.oracle.com/javase/1.5.0/docs/guide/jvmti.
Jvmdi is divided into three parts: jvmdi, jdwp, and jdi.
Http://docs.oracle.com/javase/1.4.2/docs/guide/jpda/architecture.html
This article briefly introduces how to use jdi to monitor program running.
Assume that the
Introduced:In front of a lot of space to discuss the JVMTI and jdwp parts, now finally see the most close to the user side of the section, JDI.Analysis:A. Basic knowledge of JDIUnlike Jvmti and JDWP, JDI provides a set of interfaces that are written in pure java. They are primarily for the development environment IDE, although the implementation of the debugger can directly take advantage of JDWP or JVMTI, but the more this layer can be from the user'
Components debugger interfaces/| -------------- |/| VM | debuggee ---- (| -------------- | Jdi is the upper-layer interface of JPDA. Let's first build an example of jdi and first feel its functions. Jdi specification is the jdi class library. There are three examples of jdi
amount of effort. The answer is yes. By using the Java Debug Interface (JDI), developers can quickly develop custom thread Profiling tools that apply to them. Such tools are independent of the main program and can be highly customizable. In the following article, we will describe how to implement the tool.
Know JPDA and JDI
Starting with J2SE 1.3, Java started providing a set of architectures called the
Introduced:The mirror mechanism of JDI is mentioned above, which maps all the data, types, domains, methods, events, States, and resources of the entire target virtual machine, as well as the event requests sent by the debugger to the target virtual machine, to mirror objects. The link module of JDI is discussed further here.Analysis:The main purpose of the connection module is to provide an interactive cha
Introduced:The previous article looks at the JDI protocol as a whole, which combines the implementation code of Eclipse to discuss the mirror mechanism of JDI.Analysis:The mirroring mechanism maps all data, types, domains, methods, events, states, and resources on the target virtual machine, as well as event requests sent by the debugger to the target virtual machine, to the Mirror object. The idea, like the O/R mapping we often call it, is to unify t
It undertakes machine vision detection, image processing, OCR, License Plate Recognition, face recognition, and other projects. QQ:896922782
The following are some cases of the studio, which will be detailed later.
1. Real-time Rice screening
June 01, 2005 This article describes how to set up a JSP breakpoint in Eclipse and how to debug a JSP remotely by developing an example of a JSP editor plug-in. As a basic knowledge, the first two parts of this article describe the fundamentals of JAVA Debug and JSR-45.
Environmental requirements: The code in this article was tested on eclipse3.0.0,jdk1.4.2 and Tomcat5.0.5.
Introduction to the JAVA Debugging framework (JPDA)
JPDA is a multi-layer debugging framework that includes three levels of
. properties)
It is useless before the last line of the file.) target = android-3 should be set to target = android-8 and saved.
Let's take a look at your project and the new android 2.2 project structure.
Error Message]
When Webservice is called, the following error occurs:
'Jdi thread evaluations 'has encountered a problem
Exception processing async thread queue
Exception processing async thread queue
JDI
. properties (important)Target = android-3 in the last line of the file (not used in the previous step), and save it as target = android-8.Let's take a look at your project and the new android 2.2 project structure.[Error message]When the Webservice is called during thread debug (running is normal:'Jdi thread evaluations 'has encountered a problemException processing async thread queueException processing async thread queueJDI thread evaluationsCause
information from the JVM runtime (such as viewing debug information) and control the JVM's running process (such as stepping) to achieve the purpose of debugging. This thing depends on the debugger itself, certainly cannot be done. Otherwise, the security of the JVM is greatly compromised. Unless the JVM provides some kind of "backdoor", the debugger queries some run-time information and allows the debugger to send some control commands. Have to sigh, the power of the JVM. Starting from J2se
on the JVM.
In any case, we have to get internal information about the JVM's runtime (such as viewing debugging information) and control the JVM's running process (such as stepping) to achieve the goal of debugging.
This is something that cannot be done by the debugger itself. Otherwise, the JVM's security is compromised. Unless the JVM provides some kind of backdoor, the debugger queries some run-time information and allows the debugger to send some control commands.
Had to sigh, the JVM was
released, there is only one connector connected to the socket, and the machine being debugged must be a debug host connected to the debugger. Because of the limitations of memory and CPU, it is impractical to have a mobile device acting as a host.
For remote debugging, you must use the Java Virtual Machine (JVM) V5.0 or newer versions, such as the Java SE Development Kit (JDK) for ibm®j9 or Sun Microsystem. This article focuses on remote debugging, not the specifics of each Eclipse debugging f
JPDA (Java Platform Debugger architecture) is the acronym for the Java Platform Debug architecture, and with the API provided by JPDA, developers can easily and flexibly build Java debugging applications. JPDA consists of three main components: Java Virtual Machine Tool Interface (JVMTI), Java Debug Line Protocol (JDWP), and Java Debugging Interface (JDI), this series will detail the internal details of these three modules and uncover the JPDA veil fo
the program in debug mode
Adb shell am start-D-n com. example. mytestcm/. MainActivityThe Waiting For Debugger page appears on the mobile phone interface.
5. Open ddms or Eclipse (if necessary, in order to use the jdb command)
6. IDA appending
7. Set debugging options
Debugger-Debugger Options
8. Run the program F9
IDA, F9 runs the program, which is in the runing state.Run jdb-connect com. sun. jdi. SocketAttach: hostname = 127.0.0.1, port = 8700 in
restrictions and can be written in any language, as long as it complies with the jdwp specifications. Jdi (Java debug Interface) includes a Java jdwp debugger implementation (jdi will be introduced in the next article in this series), JDKThe debugging tool jdb also uses jdi to complete its debugging function. The roles of the jdwp agent described above in debugg
Delay initialization of the JDWP library until an exception of the given class are thrown in this VM. The exception class name must be package-qualified. Connection establishment is included in JDWP initialization, so it won't begin until the exception is thrown.
Onuncaught
No
N
If "Y", delay initialization of the JDWP library until an uncaught exception are thrown in this VM. Connection establishment is included in JDWP initialization, so it won't begin until
library when the Java Virtual machine is started, and it must implement various debug functions through the JVMTI interface provided by the Java Virtual machine, so it must be written in C + + language. And the debugger end there is no such restrictions, can be written in any language, as long as compliance with the JDWP specification. JDI (Java Debug Interface) contains a Java JDWP debugger implementation (JDI
interface provided by the Java Virtual Machine, therefore, it must be written in C/C ++. The debugger end does not have such restrictions and can be written in any language, as long as it complies with the jdwp specifications. Jdi (Java debug Interface) includes a Java jdwp debugger implementation (jdi will be in the nextArticleIn JDK, the debugging tool jdb also uses
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.